package BehaviorModel.commandModel;

/**
 * 功能描述: 冰箱开启
 * 2024/02/14
 *
 * @see Command
 * ZhangYi
 */
public class RefrigeratorOnCommand implements Command{
    private RefrigeratorReceive refrigeratorReceive;

    public RefrigeratorOnCommand(RefrigeratorReceive refrigeratorReceive) {
        this.refrigeratorReceive = refrigeratorReceive;
    }

    @Override
    public void execute() {
        refrigeratorReceive.on();

    }

    @Override
    public void undo() {
        refrigeratorReceive.off();
    }
}
